import request from '@/utils/request'

// 查询人群分类列表
export function listCluster(query) {
  return request({
    url: '/system/cluster/list',
    method: 'get',
    params: query
  })
}

// 查询人群分类详细
export function getCluster(clusterId) {
  return request({
    url: '/system/cluster/' + clusterId,
    method: 'get'
  })
}

// 新增人群分类
export function addCluster(data) {
  return request({
    url: '/system/cluster',
    method: 'post',
    data: data
  })
}

// 修改人群分类
export function updateCluster(data) {
  return request({
    url: '/system/cluster',
    method: 'put',
    data: data
  })
}

// 删除人群分类
export function delCluster(clusterId) {
  return request({
    url: '/system/cluster/' + clusterId,
    method: 'delete'
  })
}